#include "protreewidgetitem.h"



ProTreeWidgetItem::ProTreeWidgetItem(QTreeWidget *treeview, const QString &name,
                                     const QString &path, int type)
    :QTreeWidgetItem(treeview,type),
      _name(name),
      _path(path),
      _root_item(this),
      _pre_item(nullptr),
      _next_item(nullptr)
{

}

ProTreeWidgetItem::ProTreeWidgetItem(QTreeWidgetItem *parent, const QString &name, const QString &path, QTreeWidgetItem *root, int type)
    :QTreeWidgetItem(parent,type),
      _name(name),
      _path(path),
      _root_item(root),
      _pre_item(nullptr),
      _next_item(nullptr)
{

}

QString ProTreeWidgetItem::GetPath()
{
    return _path;
}

QTreeWidgetItem *ProTreeWidgetItem::GetPreItem()
{
    return _pre_item;
}
QTreeWidgetItem *ProTreeWidgetItem::GetRootItem()
{
    return _root_item;
}
QTreeWidgetItem *ProTreeWidgetItem::GetNextItem()
{
    return _next_item;
}

void ProTreeWidgetItem::SetPreItem(QTreeWidgetItem *pre_item)
{
    _pre_item = pre_item;
}

void ProTreeWidgetItem::SetNextItem(QTreeWidgetItem *next_item)
{
    _next_item = next_item;
}


